package com.hankol.message.adapter

import android.widget.ImageView
import com.baselibrary.extension.checkValue
import com.baselibrary.extension.load
import com.baselibrary.utils.TimeUtil
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.hankol.message.R
import com.hankol.message.bean.BroadcastMsgBean

/*广播 列表
* */
class SystemMsgListAdapter : BaseQuickAdapter<BroadcastMsgBean, BaseViewHolder>(R.layout.item_system_msg_list) {

    override fun convert(helper: BaseViewHolder, item: BroadcastMsgBean) {
        helper.apply {
            setText(R.id.tv_time, TimeUtil.fromToday(item.sendTime))
            getView<ImageView>(R.id.img_cover).load(mContext, item.image.checkValue())
            setText(R.id.tv_content, item.content)
        }
    }
}